package team.kirohuji.domain.attendance;

import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import team.kirohuji.domain.user.User;
@Entity
@Table(name = "attendance_record")
public class AttendanceRecord {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name="attendance_record_id")
    private Integer attendanceRecordId;

    @Column(name="check_date")
    private Date checkDate;


    private String location;

    private Integer status;

    private String comment;

    private Integer type;

    
    @ManyToOne(cascade = CascadeType.REFRESH)
    @JoinColumn(name="user_id")
	private User user;

	public Integer getAttendanceRecordId() {
		return attendanceRecordId;
	}

	public void setAttendanceRecordId(Integer attendanceRecordId) {
		this.attendanceRecordId = attendanceRecordId;
	}

	public Date getCheckDate() {
		return checkDate;
	}

	public void setCheckDate(Date checkDate) {
		this.checkDate = checkDate;
	}

	public String getLocation() {
		return location;
	}

	public void setLocation(String location) {
		this.location = location;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@Override
	public String toString() {
		return "AttendanceRecord [attendanceRecordId=" + attendanceRecordId + ", checkDate=" + checkDate + ", location="
				+ location + ", status=" + status + ", comment=" + comment + ", type=" + type + ", user=" + user + "]";
	}

    
}